/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   Module Name          : com.yaodian100.crm.workorder.entity.TaskGroupUser
   Module Description   :

   Date Created      : 2011/1/28
   Original Author   : cut7man
   Team              : yaodian100
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
   MODIFICATION HISTORY
   ------------------------------------------------------------------------------
   Date Modified       Modified by       Comments
   ------------------------------------------------------------------------------
   ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
package com.yaodian100.crm.workorder.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.yaodian100.core.admin.entity.User;

/**
 * @author cut7man
 * 
 */
@Entity
@Table(name = "CRM_TASK_GROUP_USER")
public class TaskGroupUser {
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "seq_task_group_user")
	@SequenceGenerator(name = "seq_task_group_user", sequenceName = "seq_task_group_user")
	private Long id;
	@ManyToOne
	@JoinColumn(name = "USER_ID")
	private User user;
	@ManyToOne
	@JoinColumn(name = "TASK_GROUP_ID")
	private TaskGroup taskGroup;
	@Column(name = "DEFAULT_GROUP")
	private Boolean defaultGroup = false;

	// MANAGER, APPROVER, OBSERVER, MEMBER
	@Column(name = "TASKROLE", length = 32)
	private String taskRole;

	/**
	 * @return the defaultGroup
	 */
	public Boolean getDefaultGroup() {
		return defaultGroup;
	}

	/**
	 * @param defaultGroup the defaultGroup to set
	 */
	public void setDefaultGroup(Boolean defaultGroup) {
		this.defaultGroup = defaultGroup;
	}

	/**
	 * @return the taskRole
	 */
	public String getTaskRole() {
		return taskRole;
	}

	/**
	 * @param taskRole the taskRole to set
	 */
	public void setTaskRole(String taskRole) {
		this.taskRole = taskRole;
	}

	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return the user
	 */
	public User getUser() {
		return user;
	}

	/**
	 * @param user the user to set
	 */
	public void setUser(User user) {
		this.user = user;
	}

	/**
	 * @return the taskGroup
	 */
	public TaskGroup getTaskGroup() {
		return taskGroup;
	}

	/**
	 * @param taskGroup the taskGroup to set
	 */
	public void setTaskGroup(TaskGroup taskGroup) {
		this.taskGroup = taskGroup;
	}

}
